package com.situ.boot.test;

public class Student extends Person{

    private String className;

    public void study() {
        System.out.println("班级是: " + className + "的" + name + "正在学习");
    }

    public void study(String course) {

    }

    @Override
    public void show() {
        System.out.println("Student.show");
    }

    public Student() {
    }

    public Student(Integer id, String name, Integer age, String className) {
        // super() 代表调用父类指定参数的构造方法
        super(id, name, age);
        this.className = className;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

   @Override
    public String toString() {
        return "Student{" +
                "className='" + className + '\'' +
                ", id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
